package site.edody.dframe.websocket;

import org.java_websocket.WebSocket;
import org.java_websocket.handshake.ClientHandshake;

/**
 * DFrame WebSocket 监听器接口
 * @author Dody
 */
public interface DFrameWebSocketListener {
    void onOpen(String serverName, WebSocket conn, ClientHandshake handshake) throws Exception;
    void onClose(String serverName, WebSocket conn, int code, String reason, boolean remote) throws Exception;
    void onMessage(String serverName, WebSocket conn, String message) throws Exception;
    void onError(String serverName, WebSocket conn, Exception ex) throws Exception;
}